﻿using UnityEngine;
using System.Collections;
using UnityEngine.UI;

public class UIManager : MonoBehaviour {
    public static UIManager _;
    public static GameObject blood;
    public static GameObject UIMain;

    public void Start()
    {
        _ = this;
        blood = Resources.Load("Prefabs/UI/+-Blood") as GameObject;
        UIMain = GameObject.Find("UIMain");
    }

    public void SHOWBloodChange(float num,Vector3 pos)
    {
        var go = GameObject.Instantiate(blood);
        go.GetComponent<Text>().text = num.ToString();
        go.transform.SetParent(UIMain.transform);
        go.GetComponent<BloodChangeUI>().pos = pos;
        go.transform.localScale = new Vector3(1, 1, 1);
    }
}
